package com.zmn.plat.services.impl.channel;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.zmn.common.dto.StatusDTO;
import com.zmn.plat.model.entity.channel.ChannelType;
import com.zmn.plat.model.entity.channel.ChannelTypeQuery;
import com.zmn.plat.persistence.interfaces.channel.ChannelTypeDAO;
import com.zmn.plat.services.interfaces.channel.ChannelTypeService;

/**
 * 描述:渠道类型ServiceImpl
 *
 * @author tanghongjun
 * @since: 2018/10/16 17:56
 */
@Service
public class ChannelTypeServiceImpl implements ChannelTypeService {

    @Resource
    private ChannelTypeDAO channelTypeDAO;

    @Override
    public ChannelType findByKey(Integer typeId) {
        return channelTypeDAO.findByKey(typeId);
    }

    @Override
    public Integer findKeyForMax() {
        return channelTypeDAO.findKeyForMax();
    }

    @Override
    public List<ChannelType> listPageByQuery(ChannelTypeQuery query) {
        return channelTypeDAO.listPageByQuery(query);
    }

    @Override
    public List<ChannelType> listByQuery(ChannelTypeQuery query) {
        return channelTypeDAO.listByQuery(query);
    }

    @Override
    public List<ChannelType> listAll() {
        return channelTypeDAO.listAll();
    }

    @Override
    public Integer countByQuery(ChannelTypeQuery query) {
        return channelTypeDAO.countByQuery(query);
    }

    @Override
    public Integer updateByKey(ChannelType channelType) {
        return channelTypeDAO.updateByKey(channelType);
    }

    @Override
    public Integer updateStatus(ChannelType channelType) {
        return channelTypeDAO.updateStatus(channelType);
    }

    @Override
    public Integer updateStatusBatch(StatusDTO dto) {
        return channelTypeDAO.updateStatusBatch(dto);
    }

    @Override
    public Integer insert(ChannelType channelType) {
        return null;
    }

    @Override
    public Integer deleteByKey(Integer typeId) {
        return channelTypeDAO.deleteByKey(typeId);
    }
}